Info

Row

Opinion Comparison Count

comparison_review <- dat %>% 
  select(gameId, title, comment_clean) %>% 
  unnest_tokens(word, comment_clean) %>% 
  anti_join(my_stop_words, by = 'word')
DT::datatable(head(comparison_review %>% count(word, title, sort = T) %>% ungroup(), 1000), options = list(pageLength = 10))

Game Comparison Count

DT::datatable(head(comparison_review %>% count(word, gameId, sort = T) %>% ungroup(), 1000), options = list(pageLength = 10))

WordCloud

Opinion Comparison

comparison_review %>% 
  count(word, title, sort = T) %>% 
  acast(word ~ title, value.var = 'n', fill = 0) %>% 
  comparison.cloud(colors=brewer.pal(4, 'Set2'), random.order = FALSE, rot.per = 0.25, title.size = 1.5)

Game Comparison

comparison_review %>% 
  count(word, gameId, sort = T) %>% 
  acast(word ~ gameId, value.var = 'n', fill = 0) %>% 
  comparison.cloud(colors=brewer.pal(6, 'Set2'), max.words = 1000, random.order = FALSE, rot.per = 0.25, title.size = 1.5)

Wordcloud

Data Table

Top 10 Words for each Game

wordcloud <- dat %>% 
  select(gameId, comment_clean) %>% 
  unnest_tokens(word, comment_clean) %>% 
  anti_join(my_stop_words, by = 'word') %>% 
  count(word, gameId, sort = T) %>% 
  ungroup() %>% 
  group_by(word, gameId) %>% 
  summarise(freq = sum(n)) %>% 
  arrange(gameId,desc(freq))
DT::datatable(wordcloud %>% group_by(gameId) %>% top_n(10, freq), options = list(pageLength=10))
wordcloud %>%
  group_by(gameId) %>% 
  top_n(10, freq) %>%
  ungroup() %>%
  mutate(word = reorder(word, freq)) %>% 
  ggplot(aes(word, freq, fill = gameId)) +
  geom_col(show.legend = F) +
  scale_color_brewer(type = 'div',palette = 'Reds') +
  labs(x=NULL, y ='Frequency') +
  facet_wrap(~gameId, scales = 'free') +
  coord_flip()

Wordcloud

Cities Skylines

wordcloud %>%
  filter(gameId == 'Cities_skylines') %>%
  select(word, freq) %>%
  with(wordcloud(word, freq, rot.per = 0.25, max.words = 200, colors=brewer.pal(12, 'Paired'), random.order = FALSE))

GTA V

wordcloud %>% 
  filter(gameId == 'GTA5') %>% 
  select(word, freq) %>% 
  with(wordcloud(word, freq, rot.per = 0.25, max.words = 200, colors=brewer.pal(12, 'Paired'), random.order = FALSE))

PUBG

wordcloud %>% 
  filter(gameId == 'pubg') %>% 
  select(word, freq) %>% 
  with(wordcloud(word, freq, rot.per = 0.25, max.words = 200, colors=brewer.pal(12, 'Paired'), random.order = FALSE))

DOTA2

wordcloud %>% 
  filter(gameId == 'dota') %>% 
  select(word, freq) %>% 
  with(wordcloud(word, freq, rot.per = 0.25, max.words = 200, colors=brewer.pal(12, 'Paired'), random.order = FALSE))

Civil VI

wordcloud %>%
  filter(gameId == 'Civilization') %>%
  select(word, freq) %>%
  with(wordcloud(word, freq, rot.per = 0.25, max.words = 200, colors=brewer.pal(12, 'Paired'), random.order = FALSE))

Rocket League

wordcloud %>% 
  filter(gameId == 'Rocket_League') %>% 
  select(word, freq) %>% 
  with(wordcloud(word, freq, rot.per = 0.25, max.words = 200, colors=brewer.pal(12, 'Paired'), random.order = FALSE))

TF_IDF